<template>
	<view class="page-error-recovery">
		<u-navbar title="纠错建议" back-icon-color="#000" :border-bottom="false"
		title-size="36" title-color="#000" title-bold>
			<view class="navbar-right" slot="right" @click="add">
				添加
			</view>
		</u-navbar>
		<view class="error-recovery-list">
			<u-cell-group>
				<u-cell-item :title="item.nr" v-for="(item,index) in list" :key="item.id" 
				@click="goDetail('to','/pages/HomeLnner/error-recovery-detail/error-recovery-detail',{id:item.id})"
				></u-cell-item>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
	import {commonGet} from '@/api/commonapi.js'
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			add(){
				this.$u.route('/pages/HomeLnner/add-error-recovery/add-error-recovery');
			},
			getList(){
				let _this = this
				let query = {
					ak:_this.$store.state.token,
					cmd:"nEbook_list_proc",
					para:JSON.stringify({})
				}
				commonGet(query,({Data:{Data}})=>{
					_this.list = Data
				})
			},
			goDetail(type,url,params){
				this.$u.route({
					type:type,
					url: url,
					params:params
				})
			}
		}
	}
</script>

<style lang="scss">
.navbar-right{
	padding-right: 30rpx;
	font-size: 28rpx;
}
.error-recovery-list{
}
</style>
